module planegame{

    export class BulletFactory {
        // 创建子弹 资源名称 子弹类型
        public static createBullet(resName:string, type:number, game:Game): Bullet {
            let bullet:Bullet = new Bullet();
            
            switch(type) {
                case 1:
                    bullet = new LineBullet(resName);
                break;
                case 2:
                    bullet = new SanBullet(resName);
                break;
                case 3:
                    bullet = new EnemyBullet(resName, game);
                break;
            }
            return bullet;
        }

        public static createPlane(resName:string): Plane {
            let plane = null;
            plane = new Plane(resName);
            return plane;
        }

        public static createBackGround(resName:string): Background {
            let background = null;
            background = new Background(resName);
            return background;
        }
    }
}